package com.ccx.library.module.menu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName(value = "sys_menu")
public class Menu {

    @TableId(value = "menu_id",type = IdType.ID_WORKER_STR)
    private String menu_id;

    private String menu_name;

    private String menu_module;

    private String parent_id;

    private String path;

    private String icon;

    private Integer type;

    private String meta;

    @TableField(exist = false)
    @JsonIgnore
    private List<Menu> children=new ArrayList<>();
}
